package user.client;

import com.example.entity.Carrier;
import com.example.entity.Truck;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value="carrier-service", fallback = CarrierFallbackClient.class)
public interface CarrierClient {
    @PostMapping("/createCarrier")  // 根据id获取货车
    void insert(@RequestBody Carrier c);
    @GetMapping("/selectCarrierByUser")  // 根据用户id获取承运商
    Carrier selectCarrierByUser(@RequestParam(name = "id") Long id);
}
